package main

import (
	"ConvertFlow/cmd/client/commands"
	"ConvertFlow/convertlog"
	"fmt"
	"github.com/spf13/cobra"
)

func main() {
	var (
		err error
	)
	//1.TODO:load setting file

	//2.init convertlog
	err = convertlog.InitLogger("client.convertlog", "./", "ERROR")
	if err != nil {
		fmt.Println("InitLogger function failed!")
		return
	}

	var rootCmd = &cobra.Command{
		Use:   "sender",
		Short: "A tool for sending data through different protocols",
	}
	rootCmd.AddCommand(commands.IcmpRootCmd)
	rootCmd.AddCommand(commands.OspfRootCmd)

	rootCmd.Execute()
}
